﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CollegeShop.Api.BaseComponent;
using CollegeShop.Api.Infrastructure;

namespace CollegeShop.Api.Report
{
    public class xxxBiz : IComponent
    {
        private xxxBiz() { }
        public CollegeShop.Api.Entity.T_Goods getOne(int college)
        {
            CollegeShop.Api.Entity.T_Goods o = WithCache("xxxBiz.getOne",
                () => {
                    CollegeShop.Api.Entity.T_Goods goods = new T_GoodsDal().GetModel(college, 1);
                    return goods; 
                }, 10);
            return o;            
        }

        public static xxxBiz Instance
        {
            get
            {
                if (instance == null)
                {
                    lock (key)
                    {
                        if (instance == null)
                        {
                            instance = new xxxBiz();
                        }
                    }
                }
                return instance as xxxBiz;
            }
        }
    }
}
